package com.example.demo01.demo;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description:
 * @author: zhangshiwei
 * @date: 2021年11月02日 17:52
 */
@Getter
@AllArgsConstructor
public enum FlowChartRelationEnum {

    /**
     * 数据加载
     */
    load("数据加载", "1", "load", "c"),

    /**
     * 缺失值填充
     */
    imputer("缺失值填充", "2", "imputer", "c"),

    /**
     * 数据类型转换
     */
    changeDataType("数据类型转换", "3", "changeDataType", "c"),

    /**
     * 数据过滤
     */
    filter("数据过滤", "4", "filter", "c"),

    /**
     * 尺度变换
     */
    changeScale("尺度变换", "5", "changeScale", "c"),

    /**
     * 标准化
     */
    standardization("标准化", "6", "standardization", "l"),

    /**
     * 归一化
     */
    normalization("归一化", "7", "normalization", "l"),

    /**
     * 二值化
     */
    binarizer("二值化", "8", "binarizer", "r"),

    /**
     * 特性分桶
     */
    bucketizer("特性分桶", "9", "bucketizer", "r"),

    /**
     * 分位数离散化
     */
    quantileDiscretizer("分位数离散化", "10", "quantileDiscretizer", "r"),

    /**
     * 独热编码
     */
    oneHot("独热编码", "11", "oneHot", "r"),

    /**
     * 数据切分
     */
    split("数据切分", "12", "split", "c"),

    /**
     * 上采样
     */
    upSample("上采样", "13", "upSample", "l"),

    /**
     * 下采样
     */
    downSample("下采样", "14", "downSample", "r"),

    /**
     * 算法名
     */
    algrithmName("算法名", "15", "algrithms", "c");


    private String name;

    private String id;

    private String value;

    private String position;

    public static FlowChartRelationEnum value2Enum(String id) {
        if (id == null) {
            return null;
        }
        String paramId = id;
        for (FlowChartRelationEnum e : values()) {
            String eId = e.getId();
            if (eId.equals(paramId)) {
                return e;
            }
        }
        return null;
    }
}
